﻿Nationstech.N32G43x_Library.0.1.0版本：TIMx_DCTRL后面的寄存器无法应用DMA Burst功能，修改相应代码TIMx_DCTRL后面的寄存器无法应用DMA Burst功能，修改相应代码TIMx_DCTRL后面的寄存器无法应用DMA Burst功能，修改相应代码
初版修订

Nationstech.N32G43x_Library.1.0.0版本：
1、n32g43x.h V1.0.2,
   1)COMP结构体移动RES寄存器位置修改
2、n32g43x.h v1.0.3、n32g43x_rcc.h v1.0.2、n32g43x_rcc.c v1.0.1
   1)修改RCC_CFG3 RCC_CFG3_TRNG1MPRES分频值描述
3、system_n32g43x.c v1.0.1
   1)修改RCC->CFG3写复位值
4、USB 新增 JoyStickMouse 例程
5、NVIC IRQ_Mask main.c v1.0.1，更新Demo工程；
6、USB 新增打印机例程
7、ADC驱动C文件增加对校准功能的函数重入性控制 
8、更正lpuart.h中LPUART_INT_WUF定义以及lpuart WakeUpFromStop2示例中PWR_EnterSTOP2Mode函数参数RetentionMode
9、PWR中 LP RUN功耗优化，在SetSysClock_MSI函数添加RCC_DeInit()；
10、更新RCC_CFG寄存器的MCOPRES[3:0]的定义；
11、n32g43x.h v1.0.5 更新RCC_MCO_PLLCLK定义；
    n32g43x_rcc.h v1.0.4 更新RCC_MCO_PLLCLK定义；
	n32g43x_rcc.c v1.0.2 更新RCC_MCO_PLLCLK定义；
12、1)LPUART和USART模块 HardwareFlowCtrl将Receive_RTS和Transmit_CTS合并成HardwareFlowCtrl，并更新readme
      2)USART模块 IrDA将Receive和Transmit合并成Transmit_Receive，并更新readme
      3)USART模块 IrDA功能增加低功耗模式测例LP_Transmit_Receive
13、I2C代码优化
14、STOP2系统时钟4分频异常问题优化
15、时钟初始化更新，支持1C以后版本
16、keep the bor always in Stop2&Standby&lp run&lp sleep mode
17、USB例程GPIO端口配置前先初始化
18、修改LPTIM_Disable为清使能位。


Nationstech.N32G43x_Library.1.2.0版本：
1、修改RT-Thread的设备驱动，更新RT-Thread的Demo的写法，采用默认启动方式——在main()里创建应用线程；添加IAR里的工程示例
2、删除 RTC_ConfigOutput 中未使用的变量
3、修改LPTIM_Disable函数
4、配置 SystemInit()/RCC_DeInit(void) 函数 RCC->CFG2 为默认值 
5、将User_RTC_Config.c中的%0.2 改成%2 消除GCC警告
6、删除flash中未使用的变量
7、修改RCC_DeInit(void) 函数 RCC->CLKINT 清中断赋值错误问题
8、修改USB Keyboard例程，删除打印
9、针对GCC编译进行优化，修改了I2C例程中的中断函数需要打印输出的变量类型将u32int_t改为unsigned int
10、RCC模块增加LSE晶体配置接口函数LSE_XtalConfig
11、USB Demo 在Suspend里面增加通过宏控制UCDR复位
12、删除RT-Thread中drv_gpio.c中N32G43X_pin_irq_enable()函数里的IO配置
13、修改n32g43x_wdog_control函数，不使用宏，定义两个变量存储RELV和PREDIV寄存器的值，删除RT-Thread的Demo的IAR工程里的dep文件
14、EEPROM例程修改EEPROM读函数，以及I2C_slave_int中初始化I2C_slave的函数内部变量名称
15、LPUART模块
	驱动文件LPUART_GetIntStatus函数修改LPUART的WUF标志位获取问题
16、修改USB驱动usb_regs.h文件里的_BlocksOf32宏，wNBlocks << 11改为wNBlocks << 10
17、修改枚举变量GPIO_CurrentType 枚举值
18、修改I2C EEPROM例程i2c_eeprom.c文件，将中断模式以及DMA模式调通。
19、修改TimeBasic6 例程main.c RCC_ConfigPclk1(RCC_HCLK_DIV4)使PCLK1 = HCLK/4
20、修改LPTIM DEMO中的产生测试信号的函数
21、修改SPI FLASH中的W25Q128擦除命令宏定义
22、新增GCC下载配置文件和启动文件
23、修改void RCC_ConfigLse(uint8_t RCC_LSE, uint8_t LSE_Gm)函数
24、修改TIM DEMO中注释
25、修改DEMO readme，增加英文版本 readme
26、USB demo ERROR和ESOF中断关闭
27、修改WWDG例程中Readme相关描述、代码中函数WWDG_SetWValue和Delay的参数
28、修改USB demo中latency的赋值方式及大小
29、修改CAN波特率/扩展帧标志符/CAN GPIO/工作模式为正常模式
30、将函数void RTC_WKUP_IRQHandler(void) 中的 EXTI_ClrITPendBit(EXTI_LINE20);提到周期性唤醒标志判断外
31、TIMx_DCTRL后面的寄存器无法应用DMA Burst功能，修改相应代码
32、将 SYSCLKConfig_STOP(uint32_t RCC_PLLMULL) 中的FLASH->AC 更换成变量操作
33、增加I2C MASTER INT demo中的错误中断服务函数，以及修复IIC_RCCReset函数中的引脚状态复位错误。



Nationstech.N32G43x_Library.1.2.1版本：
1、增加ADC_DifferentialMode 例程
2、退出LPRUN恢复SRAM电压至1.1V
3、修改RtcAutoWakeUp例程，进入Stop2模式前后增加时钟切换操作
4、修改RTC_CLKSourceConfig函数,去掉复位备份寄存器操作
5、修改获取UID/UCID函数
6、修改RTC例程增加重复分频机制
7、串口例程增加清除溢出中断机制
8、将RCC_ConfigLse函数分步赋值修改成变量一次性赋值
9、RTC例程增加避免重复配置机制
10、增加ADC_ReferenceVoltageSwitch 例程
11、去掉Flash驱动中的PD选项位
12、ADC启动增加延时滤波

Nationstech.N32G43x_Library.1.2.2版本：
1、修改LSE增益默认值为0x1FF
2、删除TSC模块
3、增加LIN主从机例程
4、增加Smartcard例程
5、修改RTC驱动亚秒在小于2秒时不能进入初始化
6、修改USB进入初始化后配置USB中断
7、修改USB DEMO复位处理流程
8、增加软件计算CRC32，并对比软硬件计算结果
9、修改CompOut和CompBreak例程中，将测试引脚PD2，PD3替换成PD14，PD15;
10、修改ExtLinesTrigger例程中，将测试引脚PD11替换成PA11;
11、TIM的demo中增加结构体初始化。
12、修改RTC例程将时间/日期打印格式调整为%02u
13、修改CAN_RX_Tx例程Readme.txt文件中数据帧为扩展帧
14、修改system_n32g43x.c文件，限定选择PLL为时钟源时，系统时钟最小为32MHz
15、修改RT_Thread drv_can文件，增加CAN_SCE_IRQHandler and CAN_RX1_IRQHandler中断处理函数
16、修改n32g43x_adc.c文件中的Reference_Voltage_Switch()函数，使应用中切换到内部VRENUFF后PA0不会输出Vrefbuffer

Nations.N32G43x_Library.2.0.0版本：
1、修改n32g43x_pwr.c文件中的PWR_ExitLowPowerRunMode（）函数：_SetLprunSwitch(2)→_SetLprunSwitch(3)
2、增加函数TIM_ConfigUpdateEvt
3、增加所有RT_Thread例程的GCC环境
4、修改RTC_EnterInitMode函数
5、n32g43x_rtc.c文件中的RTC_EnterInitMode函数添加超时退出处理
6、优化n32G43x_pwr.c/.h文件
7、优化PWR模块的LP_RUN和LP_SLEEP demo
8、修改USB串口DEMO，支持64字节数据发送
9、修改RTC自动唤醒DEMO中断处理
10、USB新增HID_Customer DEMO，修改HID_Keyboard和Printer DEMO
11、驱动n32g43x_lpuart.c的LPUART_FlushRxFifo函数增加while等待描述
12、删除ICache的coremark demo
13、CAN模块CAN_Tx_Rx/LoopBack_CAN两个demo，Systick_MS_Config函数去掉封装，改为直接调用的形式
14、USART模块在DMA_Interrupt/Interrupt/LP_Transmit_Receive/Transmit_Receive/LIN_slave DEMO中，中断函数中添加对ORERR/PEF/NEF/FEF标志的判断和清除操作
15、LPUART模块DMA_Interrupt等全部demo，RCC_Configuration函数增加超时退出机制
16、LPUART模块WakeUpFromStop2 demo，SetSysClock_HSE函数增加超时退出机制
17、修改RCC、I2C例程报错处理方式
18、修改system_n32g43x.c：初始化开icache，关预取
19、优化PWR模块的AlarmWakeUp和STOP2 demo
20、驱动n32g43x_adc.c中，ADC_GetIntStatus()与ADC_GetFlagStatus()增加延时处理
21、修改ADC驱N32g43x_adc.c与.h文件，拓展ADC_GetIntStatus()，ADC_ConfigInt()函数的传参
22、修改ADC demo中ADC DMA使能的位置以及关于ENDC/JENDC使用
23、各模块初始化前，添加调用结构体初始化函数
24. UART的GPIO添加上拉

Nations.N32G43x_Library.2.1.0版本：
1、修改USB DEMO，描述符根据实际大小设置数组大小，字符串数组根据实际大小判断
2、修改GPIO 驱动能力枚举值
3、优化USART_Init函数
4、优化PWR_EnterSTOP2Mode、PWR_EnterLowPowerRunMode、PWR_ExitLowPowerRunMode函数
5、优化I2C EEPROM例程：读eeprom时添加中断及DMA模式，优化while1等待
6、优化RTC驱动RTC_GetTime函数

Nations.N32G43x_Library.2.2.0版本：
1、FLASH页擦函数增加地址判断
2、USART的demo中新增OREF查询的处理、RX IO改成上拉
3、FLASH写保护demo添加LOCK函数
4、RTC驱动中读TSH或SUBS寄存器后再读一次DATE触发同步
5、EXTI的Demo中改用EXTI_GetStatusFlag()获取标志
6、SPI_Flash的Demo中sFLASH_SendByte()和sFLASH_SendHalfWord()函数发送数据后先获取TE和BUSY标志再获取RNE标志
7、USB的Demo使用宏定义在系统初始化中配置系统时钟，不在Demo中配置系统时钟
8、USB的Demo在USB_LOW_PWR_MGMT_SUPPORT模式下，修改Suspend()中的实现
9、优化RCC驱动中RCC_ConfigRtcClk()函数实现
10、优化ADC温度传感器的demo
11、优化LPTIM模块LPTIM_NENC demo
12、更新LPTIM_WakeUp demo的readme
13、按最新SDK readme规范修改所有demo的readme
14、RTC所有Demo中闹钟设置DateWeekValue从0x31改成31
15、删除RTC模块中的TSC
16、优化ADC_StartCalibration与ADC_GetCalibrationStatus函数
17、优化I2C EEPROM例程，防止低主频下数据出错
18、新增I2C主/从机双地址demo
19、修正ADC_GetFlagStatusNew函数中的断言
20、优化TIM模块的InputCapture和InputCapture_DualEdge demo


Nationstech.N32G43x_Library.0.1.0 version:
Revision.

Nationstech.N32G43x_Library.1.0.0 version:
1. n32g43x.h V1.0.2:
    1)COMP structure moved RES register position modification
2、n32g43x.h v1.0.3、n32g43x_rcc.h v1.0.2、n32g43x_rcc.c v1.0.1
    1) Modify RCC_CFG3 RCC_CFG3_TRNG1MPRES frequency division value description
3. system_n32g43x.c v1.0.1:
    1) modified RCC->CFG3 Write reset value
4. USB added JoyStickMouse routine
5. NVIC IRQ_Mask main.c v1.0.1, update Demo project
6. USB added printer routines
7. ADC driver C file adds functional reentrant control to the calibration function
8. Correct the definition of LPUART_INT_WUF in lpuart.h and the parameter of PWR_EnterSTOP2Mode RetentionMode in the example of lpuart WakeUpFromStop2
9. Optimize the power consumption of LP RUN in PWR, add RCC_DeInit() to the SetSysClock_MSI function;
10. Update the definition of RCC_CFG register MCOPRES[3:0];
11. n32g43x.h v1.0.5 update RCC_MCO_PLLCLK definition;
     n32g43x_rcc.h v1.0.4 update RCC_MCO_PLLCLK definition;
     n32g43x_rcc.c v1.0.2 Update RCC_MCO_PLLCLK definition
12. 1)LPUART and USART module HardwareFlowCtrl merge Receive_RTS and Transmit_CTS into HardwareFlowCtrl and update readme
     2)USART module IrDA merges Receive and Transmit into Transmit_Receive and updates readme
     3)Added low power consumption test case LP_Transmit_Receive for IrDA function of USART module
13. I2C code optimization
14. STOP2 system clock 4 frequency division problem optimization
15. Clock initialization update, support 1C later version
16. keep the bor always in Stop2&Standby&lp run&lp sleep mode
17. USB routine GPIO port is initialized before configuration
18. Change LPTIM_Disable to enable LPTIM_Disable.


Nationstech.N32G43x_Library.1.2.0 version:
1. Modify the device driver of RT-Thread, update the writing of RT-Thread's Demo, and use the default startup method - create application threads in main(); add project examples in IAR
2. Delete unused variables from RTC_ConfigOutput
3. Modify the LPTIM_Disable function
4. Configure SystemInit()/RCC_DeInit(void) RCC->CFG2 is the default value
5. Change %0.2 in user_rtc_config.c to %2 to remove GCC warning
6. Delete unused variables from the Flash
7. Modify RCC->CLKINT in RCC_DeInit(void) function clear interrupt assignment error
8. Modify the USB Keyboard routine to delete printing
9. Optimized for GCC compilation, modified the variable type that the interrupt function in I2C routine needs to print, changed u32int_t to unsigned int
10. Added interface function LSE_XtalConfig for LSE crystal configuration in RCC module
11. Add macro control to UCDR reset in USB Demo
12. Delete the I/O configuration of the N32G43X_pin_irq_enable() function in drv_gpio.c of rt-thread and change the USB Demo device name of rt-thread to N32L43X
13. Modify the n32g43x_wdog_control function, Don't use macros, Define two variables to store the values of RELV and PREDIV registers, Delete the deP file in the IAR project of rt-thread Demo.
14. EEPROM routine modify EEPROM read function, and I2C_slave_int initialization I2C_slave function internal variable name
15. LPUART module: The driver file LPUART_GetIntStatus function modified the WUF flag bit of LPUART
16. Modify the _BlocksOf32 macro in the USB driver usb_regs.h file, wNBlocks << 11 change to wNBlocks <<10
17. Change the enumeration variable GPIO_CurrentType enumeration value
18. Modify I2C EEPROM routine I2C_EEPROM. C file to switch on the interrupt mode and DMA mode
19. Change TimeBasic6 routine main.c RCC_ConfigPclk1(RCC_HCLK_DIV4) to PCLK1 = HCLK/4
20. Modify LPTIM DEMO to generate test signal function
21. Modify the macro definition of W25Q128 erase command in SPI FLASH
22. Added GCC download configuration file and startup file
23. Modify the void RCC_ConfigLse(uint8_t RCC_LSE, uint8_t LSE_Gm) function
24. Modify comments in TIM DEMO
25. Modified the DEMO readme to add the English version readme
26、USB demo ERROR and ESOF interrupt closed
27. Modify the WWDG routine Readme description, WWDG_SetWValue and Delay parameters in the code=======
28、Modify the latency assignment method and size in USB demo
29. Modify RT_Thread CAN baud rate/extended frame identifier/CAN GPIO/working mode to normal mode
30. Put EXTI_ClrITPendBit(EXTI_LINE20) in front of the check wakeup flag in void RTC_WKUP_IRQHandler(void)
31. TIMx_DCTRL's subsequent registers cannot apply the DMABurst function, and modify the corresponding code
32. Replace FLASH->AC in SYSCLKConfig_STOP(uint32_t RCC_PLLMULL) function with variable  operation
33. Added error interrupt service function in I2C MASTER INT demo, and fixed pin state reset error in IIC_RCCReset function.


Nationstech.N32G43x_Library.1.2.1 version:
1.Add the demo of ADC_DifferentialMode
2.Exit LPRUN mode and restore SRAM voltage to 1.1V
3.Modify RtcAutoWakeUp Demo,Increase clock switching operation before and after entering Stop2 mode
4.Modify RTC_CLKSourceConfig function to remove the reset bkp register operation
5.Modify the function of obtaining UID/UCID
6.Modify RTC Demo add repetitive frequency division mechanism
7.USART Demo adds the machanism of clearing overflow interrupt
8.Modify step by step assignment of RCC_ConfigLse function to one-time assignment of variables
9.RTC Demo add mechanism to avoid duplicate configuration
10.Add the demo of ADC_ReferenceVoltageSwitch
11.Remove the PD option bit in the flash drive
12.ADC startup add delay filtering


Nationstech.N32G43x_Library.1.2.2 version:
1.Modify the LSE gain default value to 0x1FF
2.Delete TSC module
3.Add the demo of LIN 
4.Add the demo of Samrtcard
5.Modify RTC Driver SUBS is not less than 2 befor entering the initializations mode
6.Modify configure USB interrupt when USB entey initialization
7.Modify USB DEMO reset processing flow
8.Add software to calculate CRC32, and compare the calculation results of software and hardware.
9.Modify CompOut and CompBreak DEMO to replace the test pin PD2,PD3 with PD14,PD15
10.Modify ExtLinesTrigger DEMO of ADC module  to replace the test pin PD11 with PA11
11.Add TIM's structure initialization
12.Modify the RTC demo to adjust the time/date printf format to %02u
13.Modify the data frame to extend frame in readme.txt of CAN_Tx_Rx demo
14.Modify 3、system_n32g43x.c.file ,when PLL is selected as system clock source, the minimum system clock is 32MHz
15.Modify RT_Thread drv_can file，add CAN_SCE_IRQHandler and CAN_RX1_IRQHandler interrupt handlers
16.Modify Reference_Voltage_Switch() in n32g43x_adc.c, so that the application switchs to the internal VRENUFF after PA0 will not output Vrefbuffer

Nations.N32G43x_Library.2.0.0 version:
1.Modify PWR_ExitLowPowerRunMode() in n32g43x_pwr.c：_SetLprunSwitch(2)→_SetLprunSwitch(3)
2.Added  TIM_ConfigUpdateEvt
3.Add the GCC environment for all demo of RT_Thread
4.Modify RTC_EnterInitMode function
5.RTC_EnterInitMode function in n32g43x_rtc.c file to add timeout exit handling
6.Optimize n32G43x_pwr.c/.h files
7.Optimize LP_RUN and LP_SLEEP demo for PWR module
8.Modify Virtual_COM_Port DEMO，support send 64 bytes data
9.Modify RTC Auto wakeup DEMO interrupt handling
10.USB add HID_Customer DEMO，modify HID_Keyboard和Printer DEMO
11. add while wait description to LPUART_FlushRxFifo function of driver n32g43x_lpuart.c
12. Delete the coremark demo of ICache
13. CAN module CAN_Tx_Rx/LoopBack_CAN two demos, Systick_MS_Config function remove encapsulation, change to direct call form
14. USART module in the DMA_Interrupt/Interrupt/LP_Transmit_Receive/Transmit_Receive/LIN_slave DEMO, interrupt function to add the ORERR/PEF/NEF/FEF flag judgment and clear the operation
15. LPUART module DMA_Interrupt and other all demos, RCC_Configuration function to add a timeout exit mechanism
16. LPUART module WakeUpFromStop2 demo, SetSysClock_HSE function to increase the timeout mechanism
17.Modify the error handling of RCC and I2C routines
18.Modify system_n32g43x.c：Initialization with icache on, prefetch off
19.Optimize AlarmWakeUp and STOP2 demo for PWR module
20.ADC_GetIntStatus and ADC_GetFlagStatus functions in n3243x_adc.c file to add delay processing
21.Modify the driver file n3243x_adc.c/.h for ADC , and expand the parameters of "ADC_GetIntStatus()，ADC_ConfigInt()" function
22.Modify the code position of the ADC DMA enabling  in ADC demo ,and modify the usage of ENDC/JENDC flag
23.Add a call to the structure initialization function before each module is initialized
24.Add a pull-up to the GPIO configuration of UART.

Nations.N32G43x_Library.2.1.0 version:
1. Modify the USB demo, the descriptor sets the array size according to the actual size, and the string array is judged accroding to the actual size.
2. Modify GPIO Current enum value.
3. Optimize the USART_Init function.
4. Optimize the PWR_EnterSTOP2Mode, PWR_EnterLowPowerRunMode, and PWR_ExitLowPowerRunMode functions.
5. Optimize the I2C EEPROM routine: Add interrupts and DMA mode when reading EEPROM, and optimize the while1 wait.
6. Optimize the RTC driver RTC_GetTime function.

Nations.N32G43x_Library.2.2.0 version:
1. Added address validation to the FLASH page erase function
2. Added OREF query handling and changed RX IO to pull-up in the USART demo
3. Added LOCK function to the FLASH write protection demo
4. In the RTC driver, trigger synchronization by reading the DATE register again after reading the TSH or SUBS register
5. Modified the EXTI demo to use EXTI_GetStatusFlag() for flag retrieval
6. In the SPI_Flash demo, sFLASH_SendByte() and sFLASH_SendHalfWord() functions now acquire the TE and BUSY flags before acquiring the RNE flag after data transmission.
7. The USB demo uses macro definitions to configure the system clock during system initialization; system clock configuration is no longer performed within the demo.
8. Modified implementation in Suspend() for USB demos operating in USB_LOW_PWR_MGMT_SUPPORT mode
9. Optimized implementation of RCC_ConfigRtcClk() function in RCC driver
10. Optimized ADC temperature sensor demo
11. Optimized LPTIM module LPTIM_NENC demo
12. Updated readme for LPTIM_WakeUp demo
13. Modified readme files for all demos according to the latest SDK readme specifications
14. Changed DateWeekValue from 0x31 to 31 for alarm settings in all RTC demos
15. Removed TSC from the RTC module
16. Optimized ADC_StartCalibration and ADC_GetCalibrationStatus functions
17. Optimized I2C EEPROM routines to prevent data errors at low host frequencies
18. Added I2C master/slave dual-address demo
19. Fixed assertions in ADC_GetFlagStatusNew function
20. Optimized the InputCapture and InputCapture_DualEdge demos for the TIM module



